<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no" />
		<title>速翔网络 - QQ技术：1424445608</title>
		<link rel="stylesheet" type="text/css" href="../c/aui.css" />
		<style>
		/* 直播分类 */
		.type_add{
			padding: 0.75rem;
		}
		.type_add .type_add_p{
			font-size: 0.75rem;
			padding: 0.35rem;
		}
		.type_add_h2{
			background: #222;
			border-radius: 0.5rem;
			padding: 0.75rem;
			font-size: 0.75rem;
			margin-top: 0.75rem;
			overflow: hidden;
		}
		.type_add_h2 span{
			color: #fff;
		}
		.type_add_h2 .h2{
			color: #fff;
		}
		.type_add_h2 .h3{
			text-align: right;
			color: #fff;
			font-size: 0.65rem;
		}
		.type_add_h2 .h3 i.aui-icon-down{
			font-weight: bold;
			color: #fff;
			font-size: 0.56rem;
		}
		.type_add .aui-row{
			font-size: 0.75rem;
			margin: 0 -0.5rem;
			clear: both;
		}
		.type_add .aui-row .aui-col-xs-6{
			padding: 0 0.3rem;
			margin-top: 0.5rem;
		}
		.type_add .aui-row .aui-col-xs-6 div{
			background: #333;
			padding: 0.5rem;
			border-radius: 0.25rem;
			color: #fff
		}
		.type_add_h2 .h1{
			font-size: 0.8rem;
		}


		.sx-close{
			padding: 0.75rem;
			display: inline-block;
			margin: -0.75rem;
		}
		#jiazai img{
			width: 2rem;
			margin: 0 auto;
		}
		</style>
	</head>
	<body>
		<script id="sx-list" type="text/x-dot-template">
		 	<p class="type_add_p"></p>
		 	<div class="type_add_h2">
		 		<span class="h1">当前直播分类：</span><span class="h2"></span>
		 	</div>
		 	{{ for(var i=0,len=it.length; i < len; i++) { }}
		 	<div class="type_add_h2">
		 		<span class="h1 aui-pull-left">{{= it[i].title }}</span>
		 		<div class="aui-row">
		 			{{ for(var i_s=0,it_s=it[i].data; i_s < it_s.length; i_s++) { }}
		 			<div class="aui-col-xs-6" tapmode onclick="url({{= it_s[i_s].id }},'{{= it_s[i_s].title }}')">
		 				<div>{{= it_s[i_s].title }}</div>
		 			</div>
		 			{{ } }}
		 		</div>
			</div>
			{{ } }}
		</script>
		<div class="type_add" id="sx-view">
			<div id="jiazai"><img src="../i/loading_more.gif" /></div>
		</div>
	</body>
	<script type="text/javascript" src="../j/api.js"></script>
	<script type="text/javascript">
		apiready = function() {
			data();
		}
		function data(){
			_ajax('zhibo/typename',function(ret,err){
				if(ret){
				//	console.log(JSON.stringify(ret))
					var evalData = doT.template($api.html($api.byId('sx-list')));
					$api.html($api.byId('sx-view'), evalData(ret));
					console.log(evalData(ret))
					$api.html($api.dom('.type_add_p'),_getPrefs('_config').zhibo.type_content);
					if(api.pageParam['type_title']){
						$api.text($api.dom('.type_add_h2 .h2'),api.pageParam['type_title']);
					}else{
						$api.css($api.dom('.type_add_h2'),'display: none')
					}
					api.parseTapmode();
				}else{
					_alert(JSON.stringify(err))
				}
			})
		}
		function url(id,title){
			api.execScript({
			    name: 'zhibo_add',
					frameName:'zhibo_add',
			    script: '$(".sx-add-tags").data("id","'+id+'");$(".sx-add-tags").data("title","'+title+'");$(".sx-add-tags").html("'+title+'<span class=\'aui-iconfont aui-icon-right\'></span>")'
			});
			_close(1);
		}
	</script>
</html>
